package com.example.design_pattern.decorator;

/**
 *  Mocha 是一个装饰者
 * 装饰者 摩卡
 */

public class Mocha extends CondimentDecorator {

    public Mocha(Beverage beverage) {
        this.beverage = beverage;
    }

    public String getDescription() {
        return beverage.getDescription() + ", 摩卡";
    }

    public double cost() {
        return 0.20 + beverage.cost();
    }
}
